<?php
	class File
	{
		private $file;
		private $filePath;
		private $fileName;
		
		private function setFile($file)
		{
			$this->file = $file;
		}
		
		private function getFile()
		{
			return $this->file;
		}
		
		public function getFileName()
		{
			return $this->fileName;
		}
		
		public function setFileName($fileName)
		{
			$this->fileName = $fileName;
		}
		
		public function getFilePath()
		{
			return $this->filePath;
		}
		
		public function setFilePath($filePath)
		{
			$this->filePath = $filePath;
		}
		
		public function copyToPath($fileName,$path)
		{
			
		}
		
		public function writeTail($text)
		{
			$this->openFile('a');
			$this->writeLine($text);
			$this->closeFile($file);
		}
		
		public function openFile($mode)
		{
			$this->setFile(fopen($this->getFilePath()."/".$this->getFileName(), $mode));
		}
		
		public function writeLine($text)
		{
			fwrite($this->getFile(), $text."\n");
		}
		
		public function closeFile()
		{
			fclose($this->getFile());
		}
	}
?>